package airplane.obj;

import airplane.utils.GameUtils;
import airplane.war.GameWin;

import java.awt.*;

public class BoosShellObj extends GameObj {

    public BoosShellObj(Image imag, int x, int y, int width, int height, int speed, GameWin gameWin) {
        super(imag, x, y, width, height, speed, gameWin);
    }

    public BoosShellObj(Image imag, int x, int y, int speed, GameWin gameWin) {
        super(imag, x, y, speed, gameWin);
    }


    @Override
    public void paintSelf(Graphics graphics) {
        super.paintSelf(graphics);
        if (y > 600) {
            this.x = -300;
            GameUtils.boosShellObjList.remove(this);
        }
        y += speed;
    }

}
